import request from '@/utils/request'

// 查询主机操作系统类型
export function getHostSystemType (ip) {
  return request({
    url: '/dockerinsight/dockerinstall/getHostSystemType/' + ip,
    method: 'get'
  })
}

// centos 添加yum库
export function addYumRepo (data) {
  return request({
    url: '/dockerinsight/dockerinstall/addYumRepo',
    method: 'post',
    data: data
  })
}

// centos 查询可用的Docker版本
export function getDockerVersion (query) {
  return request({
    url: '/dockerinsight/dockerinstall/getDockerVersion',
    method: 'get',
    params: query
  })
}

// centos 执行安装
export function install (data) {
  return request({
    url: '/dockerinsight/dockerinstall/install',
    method: 'post',
    data: data
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/dockerinsight/dockerinstall/getInitData/' + dictTypes,
    method: 'get'
  })
}
